﻿using System;
using UnityEngine;

namespace H
{
	// Token: 0x02000237 RID: 567
	public class H_PoseData
	{
		// Token: 0x06000F55 RID: 3925 RVA: 0x00061D0C File Offset: 0x0005FF0C
		public H_PoseData(TagText.Element element)
		{
			element.GetVal(ref this.id, "id", 0);
			element.GetVal(ref this.name, "name", 0);
			element.GetVal(ref this.showMale, "showMale", 0);
			TagText.Attribute attribute = element.GetAttribute("ik");
			if (attribute != null && attribute.vals.Count % 4 == 0)
			{
				for (int i = 0; i < attribute.vals.Count; i += 4)
				{
					string ikChara = attribute.vals[i];
					string ikPart = attribute.vals[i + 1];
					string targetChara = attribute.vals[i + 2];
					string targetPart = attribute.vals[i + 3];
					this.ikDatas.Add(new IK_Data(ikChara, ikPart, targetChara, targetPart));
				}
			}
			this.camera = new IllusionCameraResetData();
			element.GetVal(ref this.camera.pos.x, "cameraPos", 0);
			element.GetVal(ref this.camera.pos.y, "cameraPos", 1);
			element.GetVal(ref this.camera.pos.z, "cameraPos", 2);
			element.GetVal(ref this.camera.eul.x, "cameraEul", 0);
			element.GetVal(ref this.camera.eul.y, "cameraEul", 1);
			element.GetVal(ref this.camera.eul.z, "cameraEul", 2);
			element.GetVal(ref this.camera.dis, "cameraDis", 0);
			TagText.Attribute attribute2 = element.GetAttribute("light");
			if (attribute2 != null)
			{
				this.hasLight = true;
				attribute2.GetVal(ref this.lightDir.x, 0);
				attribute2.GetVal(ref this.lightDir.y, 1);
			}
			string empty = string.Empty;
			element.GetVal(ref empty, "position", 0);
			if (empty == "壁")
			{
				this.position = H_PoseData.POSITION.WALL;
			}
			else if (empty == "椅子")
			{
				this.position = H_PoseData.POSITION.CHAIR;
			}
			else if (empty == "床")
			{
				this.position = H_PoseData.POSITION.FLOOR;
			}
			else if (empty == "特殊")
			{
				this.position = H_PoseData.POSITION.SPECIAL;
			}
			else
			{
				this.position = H_PoseData.POSITION.FLOOR;
			}
			string empty2 = string.Empty;
			element.GetVal(ref empty2, "members", 0);
			if (empty2 != null)
			{
				if (empty2 == "M1F2" || empty2 == "F2M1")
				{
					this.members = H_StyleData.MEMBER.M1F2;
					return;
				}
				if (empty2 == "M3F1" || empty2 == "F1M3")
				{
					this.members = H_StyleData.MEMBER.M3F1;
					return;
				}
			}
			this.members = H_StyleData.MEMBER.PAIR;
		}

		// Token: 0x0400102E RID: 4142
		public string id;

		// Token: 0x0400102F RID: 4143
		public string name;

		// Token: 0x04001030 RID: 4144
		public bool showMale;

		// Token: 0x04001031 RID: 4145
		public IllusionCameraResetData camera;

		// Token: 0x04001032 RID: 4146
		public bool hasLight;

		// Token: 0x04001033 RID: 4147
		public Vector3 lightDir;

		// Token: 0x04001034 RID: 4148
		public IK_DataList ikDatas = new IK_DataList();

		// Token: 0x04001035 RID: 4149
		public H_PoseData.POSITION position;

		// Token: 0x04001036 RID: 4150
		public H_StyleData.MEMBER members;

		// Token: 0x02000238 RID: 568
		public enum POSITION
		{
			// Token: 0x04001038 RID: 4152
			FLOOR,
			// Token: 0x04001039 RID: 4153
			CHAIR,
			// Token: 0x0400103A RID: 4154
			WALL,
			// Token: 0x0400103B RID: 4155
			SPECIAL
		}

		// Token: 0x02000239 RID: 569
		public enum MEMBER
		{
			// Token: 0x0400103D RID: 4157
			PAIR,
			// Token: 0x0400103E RID: 4158
			M1F2,
			// Token: 0x0400103F RID: 4159
			NUM
		}
	}
}
